package jsu.xxy.coffee3.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jsu.xxy.coffee3.domain.OrderIdAndProduct;
import jsu.xxy.coffee3.domain.Orders;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 张从轩
* @description 针对表【orders(点单表)】的数据库操作Mapper
* @createDate 2023-06-03 06:27:58
* @Entity jsu.xxy.coffee3.domain.Orders
*/
@Mapper
public interface OrdersMapper extends BaseMapper<Orders> {
//根据order获得商品名称
    public List<OrderIdAndProduct> getProduct(@Param("oid") int oid);
    @Insert("INSERT INTO orders ( oid, productid,num, sugar, ice ) VALUES ( #{oid},#{productid},#{num}, #{sugar}, #{ice}  ) ")
    void insertin(Orders order);
}
